'****************************************************************************'
'                                                                            '
' Copyright (C) 2010 Muhammad alaa                                           '
'                                                                            '
' This program is free software; you can redistribute it and/or modify       '
' it under the terms of the GNU General Public License as published by       '
' the Free Software Foundation; either version 2 of the License, or          '
' (at your option) any later version.                                        '
'                                                                            '
' This program is distributed in the hope that it will be useful,            '
' but WITHOUT ANY WARRANTY; without even the implied warranty of             '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              '
' GNU General Public License for more details.                               '
'                                                                            '
' You should have received a copy of the GNU General Public License along    '
' with this program; if not, write to the Free Software Foundation, Inc.,    '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                '
'                                                                            '
'****************************************************************************'

Namespace Shell

    <ComImport()> _
    <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
    <Guid(IID.Shell.ICredentialProviderCredential)> _
    Public Interface ICredentialProviderCredential
        <PreserveSig()> Function Advise(<MarshalAs(UnmanagedType.Interface)> ByRef pcpce As ICredentialProviderCredentialEvents) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function CommandLinkClicked(ByVal dwFieldID As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetBitmapValue(ByVal dwFieldID As UInteger, <Out()> ByRef phbmp As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetCheckboxValue(ByVal dwFieldID As UInteger, <Out(), MarshalAs(UnmanagedType.Bool)> ByRef pbChecked As Boolean, <Out(), MarshalAs(UnmanagedType.LPWStr)> ByRef ppszLabel As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetComboBoxValueAt(ByVal dwFieldID As UInteger, ByVal dwItem As UInteger, <Out(), MarshalAs(UnmanagedType.LPWStr)> ByRef ppszItem As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetComboBoxValueCount(ByVal dwFieldID As UInteger, <Out()> ByRef pcItems As UInteger, <Out()> ByRef pdwSelectedItem As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetFieldState(ByVal dwFieldID As UInteger, <Out()> ByRef pcpfs As CredentialProviderFieldState, <Out()> ByRef pcpfis As CredentialProviderFieldInteractiveState) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetSerialization(<Out()> ByRef pcpgsr As CredentialProviderGetSerializationResponse, <Out()> ByRef pcpcs As CredentialProviderCredentialSerialization, <Out(), MarshalAs(UnmanagedType.LPWStr)> ByRef ppszOptionalStatusText As String, <Out()> ByRef pcpsiOptionalStatusIcon As CredentialProviderStatusIcon) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetStringValue(ByVal dwFieldID As UInteger, <Out(), MarshalAs(UnmanagedType.LPWStr)> ByRef ppsz As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetSubmitButtonValue(ByVal dwFieldID As UInteger, <Out()> ByRef pdwAdjacentTo As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ReportResult(ByVal ntsStatus As Integer, ByVal ntsSubstatus As Integer, <Out(), MarshalAs(UnmanagedType.LPWStr)> ByRef ppszOptionalStatusText As String, <Out()> ByRef pcpsiOptionalStatusIcon As CredentialProviderStatusIcon) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetCheckboxValue(ByVal dwFieldID As UInteger, <MarshalAs(UnmanagedType.Bool)> ByVal bChecked As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetComboBoxSelectedValue(ByVal dwFieldID As UInteger, ByVal dwSelectedItem As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetDeselected() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetSelected(<Out(), MarshalAs(UnmanagedType.Bool)> ByRef pbAutoLogon As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetStringValue(ByVal dwFieldID As UInteger, <MarshalAs(UnmanagedType.LPWStr)> ByVal psz As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function UnAdvise() As <MarshalAs(UnmanagedType.Error)> Integer
    End Interface

End Namespace